home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 January / macformat46.iso / Shareware Plus / Developers / Library / Grant's CGI Framework / Grant's CGI Framework / Documentation / WSAPI Preliminary Doc < prev   
Encoding:
Text File  |  1996-09-02  |  3.2 KB  |  79 lines

  1. Grant's CGI Framework
  2. Version 1.0 beta 15
  3.  
  4. WebSTAR API (WSAPI) Support
  5.  
  6. This is a development version of the framework.
  7.  
  8. Currently, only CodeWarrior 1.6 (CD9) project files are supplied for WSAPI support because the WSAPI library files are only available in CodeWarrior format.
  9.  
  10. *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
  11. You must get a copy of the WSAPI from StarNine Technologies.
  12. I am currently discussing the possibility of including the WSAPI files with the framework. Until that is approved, you need to go to:
  13.  
  14.   http://www.starnine.com/webstar/webstarsdk.html
  15.  
  16. *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
  17.  
  18. Setting Up Your CodeWarrior Project File
  19.  
  20. Use the "grant-wsapi-68k.µ" and/or the "grant-wsapi.µ" project file(s).
  21.  
  22. Add any additional source files and libraries you need.
  23.  
  24. Other than the name settings specified in the following section of this document, you shouldn't need to change any of the project Preference settings.
  25.  
  26. Build the plug-in and follow the WSAPI instructions for installation and testing.
  27.  
  28.  
  29. Naming Your Plug-In
  30.  
  31. In the project preferences, the name is generally all lowercase, except when specified for string constants as in the configuration header.
  32.  
  33. PowerPC:
  34. In the Preferences window:
  35. Set the "File Name" in 'Project': 'PPC Project', and the "Fragment Name" in 'Linker': 'PPC PEF' to be the name of your plug-in (use exactly the same spelling for both, case-sensitive).
  36.  
  37. 68K:
  38. In the Preferences window:
  39. Set the "Project Name" and "Resource Name" fields of the "68K Project" panel to be the name of your plug-in (use exactly the same spelling for both, case-sensitive). Set the "Sym Name" to be the name of your plug-in plus the extension ".SYM".
  40.  
  41. In "MyConfiguration.h", it's generally advisable to use the same name (except all in uppercase) for the 'kMyCGIName' constant.
  42.  
  43. You should probably make the project file name match the plug-in name.
  44.  
  45.  
  46. Modifying Existing Grant's CGI Code for WSAPI Support
  47.  
  48. There are a few changes you'll have to make in order to upgrade old code to support this new version of the framework. Please refer to the "Version History" document for details.
  49.  
  50.  
  51. Calling WSAPI Functions Directly
  52.  
  53. If you want to use any of the WSAPI functions that are not yet directly supported by Grant's CGI Framework, you will need to use the 'kCompilingForWSAPI' constant so your WSAPI specific code doesn't cause problems when compiling as an AppleEvent CGI application.
  54.  
  55. For example:
  56.  
  57.   // non-wsapi specific variables
  58.   #if kCompilingForWSAPI
  59.       WSAPI_ErrorCode  wsapiErr;
  60.   #endif
  61.  
  62.   // non-wsapi specific code
  63.  
  64.   #if kCompilingForWSAPI
  65.       wsapiErr = WSAPI_ValidateUser (user, passwd, realm);
  66.   #endif
  67.  
  68.   // more non-wsapi specific code
  69.   
  70. The 'kCompilingForWSAPI' constant is defined in "grants-application.h" or "grants-wsapi.h", depending on which project you are compiling. Those headers are automatically included in the project files provided with the framework.
  71.  
  72.  
  73. ____________________
  74. StarNine, and WebSTAR are trademarks of StarNine Technologies, Inc.
  75. CodeWarrior is a trademark of Metrowerks Inc.
  76. Symantec is a trademark of Symantec Corporation.
  77. Grant's CGI Framework is a trademark of Grant Neufeld.
  78. Copyright ©1996 by Grant Neufeld
  79.